import request from '@/config/axios'

// 订单消息 VO
export interface OrderMsgVO {
  id: number // ID
}

// 订单消息 API
export const OrderMsgApi = {
  // 查询订单消息分页
  getOrderMsgPage: async (params: any) => {
    return await request.get({ url: `/wo/order-msg/page`, params })
  },

  // 查询订单消息详情
  getOrderMsg: async (id: number) => {
    return await request.get({ url: `/wo/order-msg/get?id=` + id })
  },

  // 新增订单消息
  createOrderMsg: async (data: OrderMsgVO) => {
    return await request.post({ url: `/wo/order-msg/create`, data })
  },

  // 修改订单消息
  updateOrderMsg: async (data: OrderMsgVO) => {
    return await request.put({ url: `/wo/order-msg/update`, data })
  },

  // 删除订单消息
  deleteOrderMsg: async (id: number) => {
    return await request.delete({ url: `/wo/order-msg/delete?id=` + id })
  },

  // 导出订单消息 Excel
  exportOrderMsg: async (params) => {
    return await request.download({ url: `/wo/order-msg/export-excel`, params })
  }
}